const fs = require("fs")
const { promisify } = require('util')//express 自带的异步
const readFile = promisify(fs.readFile)//读文件
const path = require('path')
const dbPath=path.join(__dirname,'./list.json')

exports.getList =async () => {
    const data = await readFile(dbPath, 'utf8')
    return JSON.parse(data)
}

